import 'package:flutter/material.dart';
import 'package:flutter_rtk/core/flutter_bridge.dart';
import 'package:flutter_rtk/core/plugin_error.dart';
import 'package:flutter_rtk/core/plugin_execute.dart';

class ScanQRCodePlugin extends PluginExecute {
  @override
  doExecute(BuildContext context, Result result) {
    // 请求权限
    // var status = await Permission.camera.status;
    // if (status.isDenied) {
    //   status = await Permission.camera.request();
    //   if (status.isDenied) {
    //     result.callback(null);
    //     return;
    //   }
    // }
    // // 打开扫描页面,然后返回内容
    // // ignore: use_build_context_synchronously
    // // Navigator.push(context, MaterialPageRoute(builder: (context) => const ScanCodePage(), fullscreenDialog: true)).then((value) {
    // //   result.callback(value);
    // // });
    throw PluginError("插件未实现");
  }
}
